
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>通用规则 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="basic.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    入门
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../introduction/environment.html">
            
                <a href="../introduction/environment.html">
            
                    
                    环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../introduction/hello.html">
            
                <a href="../introduction/hello.html">
            
                    
                    HelloWorld
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../introduction/dev-and-debug.html">
            
                <a href="../introduction/dev-and-debug.html">
            
                    
                    开发与调试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    参考
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../framework/file.html">
            
                <a href="../framework/file.html">
            
                    
                    文件组织
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../framework/manifest.html">
            
                <a href="../framework/manifest.html">
            
                    
                    manifest文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../framework/nml.html">
            
                <a href="../framework/nml.html">
            
                    
                    nml文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../framework/page.html">
            
                <a href="../framework/page.html">
            
                    
                    页面与组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    组件
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../component/general.html">
            
                <a href="../component/general.html">
            
                    
                    通用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../component/container.html">
            
                <a href="../component/container.html">
            
                    
                    容器组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../component/basics.html">
            
                <a href="../component/basics.html">
            
                    
                    基础组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../component/form.html">
            
                <a href="../component/form.html">
            
                    
                    表单组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../component/media.html">
            
                <a href="../component/media.html">
            
                    
                    媒体组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    接口
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.5.1" data-path="general.html">
            
                <a href="general.html">
            
                    
                    通用规则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="basic.html">
            
                <a href="basic.html">
            
                    
                    基本功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="interface.html">
            
                <a href="interface.html">
            
                    
                    界面交互
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="request.html">
            
                <a href="request.html">
            
                    
                    网络访问
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="storage.html">
            
                <a href="storage.html">
            
                    
                    文件数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="system.html">
            
                <a href="system.html">
            
                    
                    系统能力
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="media.html">
            
                <a href="media.html">
            
                    
                    图形图像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="share.html">
            
                <a href="share.html">
            
                    
                    分享
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="pay.html">
            
                <a href="pay.html">
            
                    
                    支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.10" data-path="stat.html">
            
                <a href="stat.html">
            
                    
                    统计
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >通用规则</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x901A;&#x7528;&#x89C4;&#x5219;">&#x901A;&#x7528;&#x89C4;&#x5219;</h2>
<p>&#x63A5;&#x53E3;&#x65B9;&#x6CD5;&#x6709;&#x540C;&#x6B65;&#x3001;&#x5F02;&#x6B65;&#x3001;&#x56DE;&#x8C03;&#x3001;&#x5F02;&#x6B65;&#x56DE;&#x8C03;&#x56DB;&#x79CD;&#x7C7B;&#x578B;&#xFF0C;&#x4E0D;&#x540C;&#x7C7B;&#x578B;&#x7684;&#x63A5;&#x53E3;&#x65B9;&#x6CD5;&#xFF0C;&#x63D0;&#x4F9B;&#x7684;&#x80FD;&#x529B;&#x4E5F;&#x4E0D;&#x76F8;&#x540C;&#x3002;</p>
<h3 id="&#x540C;&#x6B65;">&#x540C;&#x6B65;</h3>
<p>&#x540C;&#x6B65;&#x63A5;&#x53E3;&#x4F1A;&#x76F4;&#x63A5;&#x8FD4;&#x56DE;&#x8C03;&#x7528;&#x7ED3;&#x679C;&#xFF0C;&#x7ED3;&#x679C;&#x53EF;&#x4EE5;&#x662F;&#x4EFB;&#x610F;&#x7C7B;&#x578B;&#xFF0C;&#x53C2;&#x89C1;&#x76F8;&#x5173;&#x7684;&#x63A5;&#x53E3;&#x6587;&#x6863;&#x3002;</p>
<p>&#x4F7F;&#x7528;&#x793A;&#x4F8B;</p>
<pre><code>console.log(JSON.stringify(uni.app.getInfo()));
</code></pre><h3 id="&#x5F02;&#x6B65;">&#x5F02;&#x6B65;</h3>
<p>&#x5F02;&#x6B65;&#x63A5;&#x53E3;&#x4E0D;&#x4F1A;&#x7ACB;&#x5373;&#x8FD4;&#x56DE;&#x8C03;&#x7528;&#x7ED3;&#x679C;&#xFF0C;&#x5F00;&#x53D1;&#x8005;&#x9700;&#x8981;&#x63D0;&#x4F9B;&#x5408;&#x9002;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#xFF0C;&#x5F02;&#x6B65;&#x63A5;&#x53E3;&#x4F1A;&#x5728;&#x4EFB;&#x52A1;&#x7ED3;&#x675F;&#x65F6;&#x8C03;&#x7528;&#x76F8;&#x5E94;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x3002;</p>
<p>&#x5F02;&#x6B65;&#x63A5;&#x53E3;&#x652F;&#x6301;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x56DE;&#x8C03;&#x51FD;&#x6570;</th>
<th style="text-align:left">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">success</td>
<td style="text-align:left">data</td>
<td style="text-align:left">Any</td>
<td style="text-align:left">&#x8C03;&#x7528;&#x7ED3;&#x679C;&#xFF0C;&#x53EF;&#x4EE5;&#x662F;&#x4EFB;&#x610F;&#x7C7B;&#x578B;&#xFF0C;&#x53C2;&#x89C1;&#x63A5;&#x53E3;&#x4F7F;&#x7528;&#x6587;&#x6863;&#x3002;</td>
<td style="text-align:left">&#x5728;&#x8C03;&#x7528;&#x6210;&#x529F;&#x65F6;&#x56DE;&#x8C03;</td>
</tr>
<tr>
<td style="text-align:left">fail</td>
<td style="text-align:left">data</td>
<td style="text-align:left">Any</td>
<td style="text-align:left">&#x9519;&#x8BEF;&#x4FE1;&#x606F;&#xFF0C;&#x4E00;&#x822C;&#x662F;&#x63CF;&#x8FF0;&#x9519;&#x8BEF;&#x4FE1;&#x606F;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x662F;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#xFF0C;&#x53C2;&#x89C1;&#x63A5;&#x53E3;&#x4F7F;&#x7528;&#x6587;&#x6863;&#x3002;</td>
<td style="text-align:left">&#x5728;&#x8C03;&#x7528;&#x5931;&#x8D25;&#x65F6;&#x56DE;&#x8C03;</td>
</tr>
<tr>
<td style="text-align:left"></td>
<td style="text-align:left">code</td>
<td style="text-align:left">Number</td>
<td style="text-align:left">&#x9519;&#x8BEF;&#x4EE3;&#x7801;&#xFF0C;&#x5982;&#x679C;&#x6587;&#x6863;&#x672A;&#x7279;&#x522B;&#x8BF4;&#x660E;&#xFF0C;&#x4F1A;&#x8FD4;&#x56DE;200&#x3002;&#x5982;&#x679C;&#x8FD4;&#x56DE;&#x5176;&#x4ED6;&#x9519;&#x8BEF;&#x4EE3;&#x7801;&#xFF0C;&#x9700;&#x8981;&#x5728;&#x6587;&#x6863;&#x4E2D;&#x5217;&#x4E3E;&#x8BF4;&#x660E;&#x3002;</td>
<td style="text-align:left">&#x5728;&#x8C03;&#x7528;&#x5931;&#x8D25;&#x65F6;&#x56DE;&#x8C03;</td>
</tr>
<tr>
<td style="text-align:left">cancel</td>
<td style="text-align:left">data</td>
<td style="text-align:left">Any</td>
<td style="text-align:left">&#x8C03;&#x7528;&#x7ED3;&#x679C;&#xFF0C;&#x4E00;&#x822C;&#x65E0;&#x5185;&#x5BB9;&#xFF0C;&#x53C2;&#x89C1;&#x63A5;&#x53E3;&#x4F7F;&#x7528;&#x6587;&#x6863;&#x3002;</td>
<td style="text-align:left">&#x5728;&#x7528;&#x6237;&#x53D6;&#x6D88;&#x65F6;&#x56DE;&#x8C03;&#x3002;&#x90E8;&#x5206;&#x9700;&#x8981;&#x7528;&#x6237;&#x4EA4;&#x4E92;&#x7684;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x4E2D;&#x53EF;&#x80FD;&#x63D0;&#x4F9B;&#x6B64;&#x56DE;&#x8C03;&#x652F;&#x6301;</td>
</tr>
<tr>
<td style="text-align:left">complete</td>
<td style="text-align:left">&#x65E0;</td>
<td style="text-align:left">&#x65E0;</td>
<td style="text-align:left">&#x65E0;</td>
<td style="text-align:left">&#x5728;&#x8C03;&#x7528;&#x5B8C;&#x6210;&#x65F6;&#x56DE;&#x8C03;</td>
</tr>
</tbody>
</table>
<p>success&#x3001;fail&#x548C;cancel&#x4E09;&#x4E2A;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x662F;&#x4E92;&#x65A5;&#x7684;&#xFF0C;&#x6BCF;&#x6B21;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x90FD;&#x4F1A;&#x4E14;&#x4EC5;&#x4F1A;&#x8C03;&#x7528;&#x8FD9;&#x4E09;&#x4E2A;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x4E2D;&#x7684;&#x4E00;&#x4E2A;&#xFF0C;&#x4E4B;&#x540E;&#x4F1A;&#x518D;&#x8C03;&#x7528;&#x4E00;&#x6B21;complete&#x56DE;&#x8C03;&#x3002;</p>
<p>&#x4F7F;&#x7528;&#x793A;&#x4F8B;</p>
<pre><code class="lang-javascript">uni.prompt.showContextMenu({
  itemList: [<span class="hljs-string">&apos;item1&apos;</span>, <span class="hljs-string">&apos;item2&apos;</span>],
  itemColor: <span class="hljs-string">&apos;#ff33ff&apos;</span>,
  success:  <span class="hljs-function"><span class="hljs-keyword">function</span>  (<span class="hljs-params">data</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling callback&quot;</span>);
  },
  fail:  <span class="hljs-function"><span class="hljs-keyword">function</span>  (<span class="hljs-params">data, code</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling fail, code=&quot;</span> + code);
  },
  cancel:  <span class="hljs-function"><span class="hljs-keyword">function</span>  (<span class="hljs-params">data</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling cancel&quot;</span>);
  },
  complete:  <span class="hljs-function"><span class="hljs-keyword">function</span>  (<span class="hljs-params"></span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling complete&quot;</span>);
  },
});
</code></pre>
<h3 id="&#x56DE;&#x8C03;">&#x56DE;&#x8C03;</h3>
<p>&#x540C;&#x5F02;&#x6B65;&#x63A5;&#x53E3;&#x4E00;&#x6837;&#xFF0C;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x4E5F;&#x4E0D;&#x4F1A;&#x7ACB;&#x5373;&#x8FD4;&#x56DE;&#x8C03;&#x7528;&#x7ED3;&#x679C;&#xFF0C;&#x5F00;&#x53D1;&#x8005;&#x9700;&#x8981;&#x63D0;&#x4F9B;&#x5408;&#x9002;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#xFF0C;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x4F1A;&#x8C03;&#x7528;&#x76F8;&#x5E94;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x3002;&#x4E0D;&#x540C;&#x7684;&#x662F;&#xFF0C;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x53EF;&#x80FD;&#x4F1A;&#x591A;&#x6B21;&#x8C03;&#x7528;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x3002;</p>
<p>&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x652F;&#x6301;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x56DE;&#x8C03;&#x51FD;&#x6570;</th>
<th style="text-align:left">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">callback</td>
<td style="text-align:left">data</td>
<td style="text-align:left">Any</td>
<td style="text-align:left">&#x8C03;&#x7528;&#x7ED3;&#x679C;&#xFF0C;&#x53EF;&#x4EE5;&#x662F;&#x4EFB;&#x610F;&#x7C7B;&#x578B;&#xFF0C;&#x53C2;&#x89C1;&#x63A5;&#x53E3;&#x4F7F;&#x7528;&#x6587;&#x6863;&#x3002;</td>
<td style="text-align:left">&#x5728;&#x6BCF;&#x6B21;&#x83B7;&#x5F97;&#x7ED3;&#x679C;&#x65F6;&#x56DE;&#x8C03;&#xFF0C;&#x53EF;&#x80FD;&#x4F1A;&#x56DE;&#x8C03;&#x591A;&#x6B21;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">fail</td>
<td style="text-align:left">data</td>
<td style="text-align:left">Any</td>
<td style="text-align:left">&#x9519;&#x8BEF;&#x4FE1;&#x606F;&#xFF0C;&#x4E00;&#x822C;&#x662F;&#x63CF;&#x8FF0;&#x9519;&#x8BEF;&#x4FE1;&#x606F;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x662F;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#xFF0C;&#x53C2;&#x89C1;&#x63A5;&#x53E3;&#x4F7F;&#x7528;&#x6587;&#x6863;&#x3002;</td>
<td style="text-align:left">&#x8C03;&#x7528;&#x5931;&#x8D25;&#x65F6;&#x56DE;&#x8C03;&#x3002;&#x4E00;&#x65E6;&#x8C03;&#x7528;&#x6B64;&#x56DE;&#x8C03;&#xFF0C;callback&#x8C03;&#x7528;&#x4E0D;&#x4F1A;&#x518D;&#x88AB;&#x8C03;&#x7528;&#xFF0C;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x7ED3;&#x675F;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left"></td>
<td style="text-align:left">code</td>
<td style="text-align:left">Number</td>
<td style="text-align:left">&#x9519;&#x8BEF;&#x4EE3;&#x7801;&#xFF0C;&#x5982;&#x679C;&#x6587;&#x6863;&#x672A;&#x7279;&#x522B;&#x8BF4;&#x660E;&#xFF0C;&#x4F1A;&#x8FD4;&#x56DE;200&#x3002;&#x5982;&#x679C;&#x8FD4;&#x56DE;&#x5176;&#x4ED6;&#x9519;&#x8BEF;&#x4EE3;&#x7801;&#xFF0C;&#x9700;&#x8981;&#x5728;&#x6587;&#x6863;&#x4E2D;&#x5217;&#x4E3E;&#x8BF4;&#x660E;&#x3002;</td>
<td style="text-align:left">&#x8C03;&#x7528;&#x5931;&#x8D25;&#x65F6;&#x56DE;&#x8C03;&#x3002;&#x4E00;&#x65E6;&#x8C03;&#x7528;&#x6B64;&#x56DE;&#x8C03;&#xFF0C;callback&#x8C03;&#x7528;&#x4E0D;&#x4F1A;&#x518D;&#x88AB;&#x8C03;&#x7528;&#xFF0C;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x7ED3;&#x675F;</td>
</tr>
</tbody>
</table>
<p>&#x4EE5;&#x5730;&#x7406;&#x4F4D;&#x7F6E;&#x63A5;&#x53E3;&#xFF08;uni.system.geolocation&#xFF09;&#x4E3A;&#x4F8B;&#xFF1A;</p>
<ul>
<li>&#x5982;&#x679C;&#x8C03;&#x7528; <code>uni.geolocation.subscribe</code> &#x76D1;&#x542C;&#x5730;&#x7406;&#x4F4D;&#x7F6E;&#x7684;&#x6539;&#x53D8;&#xFF0C;&#x5219;&#x6BCF;&#x6B21;&#x5730;&#x7406;&#x4F4D;&#x7F6E;&#x53D1;&#x751F;&#x6539;&#x53D8;&#xFF0C;&#x90FD;&#x4F1A;&#x8C03;&#x7528;&#x4F20;&#x5165;&#x7684;callback&#x56DE;&#x8C03;&#xFF0C;&#x8FD4;&#x56DE;&#x65B0;&#x7684;&#x4F4D;&#x7F6E;&#x4FE1;&#x606F;&#xFF1B;</li>
<li>&#x5982;&#x679C;&#x56E0;&#x4E3A;&#x7528;&#x6237;&#x62D2;&#x7EDD;&#x6388;&#x4E88;&#x6743;&#x9650;&#xFF0C;&#x4F1A;&#x8C03;&#x7528;fail&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x5E76;&#x7ED3;&#x675F;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#xFF0C;callback&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x6C38;&#x8FDC;&#x4E0D;&#x4F1A;&#x88AB;&#x8C03;&#x7528;&#x3002;</li>
</ul>
<p>&#x4F7F;&#x7528;&#x793A;&#x4F8B;</p>
<pre><code class="lang-javascript">uni.geolocation.subscribe({
  callback: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">ret</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling callback&quot;</span>);
  },
  fail: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">data, code</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling fail, code=&quot;</span> + code);
  }
});
</code></pre>
<h3 id="&#x5F02;&#x6B65;&#x56DE;&#x8C03;">&#x5F02;&#x6B65;&#x56DE;&#x8C03;</h3>
<p>&#x540C;&#x5F02;&#x6B65;&#x63A5;&#x53E3;&#x4E00;&#x6837;&#xFF0C;&#x5F02;&#x6B65;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x4E0D;&#x4F1A;&#x7ACB;&#x5373;&#x8FD4;&#x56DE;&#x8C03;&#x7528;&#x7ED3;&#x679C;&#xFF0C;&#x5F00;&#x53D1;&#x8005;&#x9700;&#x8981;&#x63D0;&#x4F9B;&#x5408;&#x9002;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#xFF0C;&#x63A5;&#x53E3;&#x5728;&#x6267;&#x884C;&#x5B8C;&#x6210;&#x65F6;&#x4F1A;&#x8C03;&#x7528;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x3002;</p>
<p>&#x540C;&#x5F02;&#x6B65;&#x63A5;&#x53E3;&#x4E0D;&#x540C;&#x7684;&#x662F;&#xFF0C;&#x8FD9;&#x7C7B;&#x63A5;&#x53E3;&#x4EC5;&#x63A5;&#x53D7;&#x4E00;&#x4E2A;callback&#x56DE;&#x8C03;&#xFF0C;&#x8C03;&#x7528;&#x6210;&#x529F;&#x4E0E;&#x5426;&#x9700;&#x8981;&#x5728;callback&#x56DE;&#x8C03;&#x4E2D;&#x5224;&#x65AD;&#x8FD4;&#x56DE;&#x7684;&#x7ED3;&#x679C;&#x6765;&#x786E;&#x5B9A;&#x3002;callback&#x4EC5;&#x4F1A;&#x88AB;&#x56DE;&#x8C03;&#x4E00;&#x6B21;&#x3002;</p>
<p>&#x5F02;&#x6B65;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x652F;&#x6301;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x56DE;&#x8C03;&#x51FD;&#x6570;</th>
<th style="text-align:left">&#x53C2;&#x6570;&#x540D;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">callback</td>
<td style="text-align:left">data</td>
<td style="text-align:left">Any</td>
<td style="text-align:left">&#x8C03;&#x7528;&#x7ED3;&#x679C;&#xFF0C;&#x53EF;&#x4EE5;&#x662F;&#x4EFB;&#x610F;&#x7C7B;&#x578B;&#xFF0C;&#x53C2;&#x89C1;&#x63A5;&#x53E3;&#x4F7F;&#x7528;&#x6587;&#x6863;&#x3002;</td>
<td style="text-align:left">&#x5728;&#x83B7;&#x5F97;&#x7ED3;&#x679C;&#x65F6;&#x56DE;&#x8C03;&#xFF0C;&#x4F1A;&#x4E14;&#x4EC5;&#x4F1A;&#x56DE;&#x8C03;&#x4E00;&#x6B21;&#x3002;</td>
</tr>
</tbody>
</table>
<p>&#x4F7F;&#x7528;&#x793A;&#x4F8B;</p>
<pre><code class="lang-javascript">uni.alipay.pay({
  orderInfo: <span class="hljs-string">&quot;order1&quot;</span>,
  callback: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">ret</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling callback&quot;</span>);
  }
});
</code></pre>
<h3 id="&#x6B63;&#x786E;&#x5B9E;&#x73B0;&#x56DE;&#x8C03;&#x51FD;&#x6570;">&#x6B63;&#x786E;&#x5B9E;&#x73B0;&#x56DE;&#x8C03;&#x51FD;&#x6570;</h3>
<p>&#x9664;&#x540C;&#x6B65;&#x63A5;&#x53E3;&#x5916;&#xFF0C;&#x5F02;&#x6B65;&#x63A5;&#x53E3;&#x3001;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x3001;&#x5F02;&#x6B65;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x90FD;&#x4E0D;&#x4F1A;&#x5728;&#x8C03;&#x7528;&#x540E;&#x7ACB;&#x5373;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#xFF0C;&#x800C;&#x662F;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#x540E;&#x6267;&#x884C;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x5E76;&#x643A;&#x5E26;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x4F5C;&#x4E3A;&#x53C2;&#x6570;&#x3002;&#x540C;&#x65F6;&#xFF0C;&#x6267;&#x884C;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x6240;&#x5904;&#x7684;&#x9875;&#x9762;&#x4E0E;&#x6700;&#x7EC8;&#x6267;&#x884C;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x7684;&#x9875;&#x9762;&#x53EF;&#x80FD;&#x662F;&#x4E24;&#x4E2A;&#x4E0D;&#x540C;&#x7684;&#x9875;&#x9762;&#x3002;</p>
<p>&#x5047;&#x8BBE;&#x6267;&#x884C;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x7684;&#x9875;&#x9762;&#x4E3A;A&#xFF0C;&#x90A3;&#x4E48;&#x6700;&#x540E;&#x6267;&#x884C;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x65F6;&#xFF0C;&#x6709;&#x53EF;&#x80FD;&#x5904;&#x4E8E;&#x4EE5;&#x4E0B;&#x4E09;&#x79CD;&#x72B6;&#x6001;&#x4E2D;&#x7684;&#x4E00;&#x79CD;&#xFF1A;</p>
<ul>
<li>A&#x9875;&#x9762;&#x4ECD;&#x7136;&#x5728;&#x663E;&#x793A;&#x4E2D;</li>
<li>A&#x9875;&#x9762;&#x88AB;&#x5207;&#x6362;&#x5230;&#x540E;&#x53F0;&#xFF0C;&#x5F53;&#x524D;&#x663E;&#x793A;&#x7684;&#x662F;&#x9875;&#x9762;B</li>
<li>A&#x9875;&#x9762;&#x5DF2;&#x7ECF;&#x88AB;&#x9500;&#x6BC1;&#x3002;</li>
</ul>
<p>&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x9700;&#x8981;&#x5224;&#x65AD;&#x9875;&#x9762;&#x7684;&#x72B6;&#x6001;&#xFF0C;&#x5E76;&#x6839;&#x636E;&#x72B6;&#x6001;&#x505A;&#x51FA;&#x6B63;&#x786E;&#x7684;&#x5904;&#x7406;&#x3002;&#x9875;&#x9762;&#x62E5;&#x6709;$valid&#x548C;$visible&#x5C5E;&#x6027;&#xFF0C;&#x4E3A;&#x5E03;&#x5C14;&#x503C;&#xFF0C;&#x4EE5;&#x65B9;&#x4FBF;&#x5224;&#x65AD;&#x9875;&#x9762;&#x72B6;&#x6001;&#xFF1A;</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// &#x9875;&#x9762;&#x662F;&#x5426;&#x6709;&#x6548;&#xFF08;&#x6CA1;&#x6709;&#x88AB;&#x9500;&#x6BC1;&#xFF09;</span>
<span class="hljs-keyword">this</span>.$valid
<span class="hljs-comment">// &#x9875;&#x9762;&#x662F;&#x5426;&#x5904;&#x4E8E;&#x540E;&#x53F0;</span>
<span class="hljs-keyword">this</span>.$visible
</code></pre>
<p>&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;&#xFF1A;&#x6709;&#x4E2A;&#x9875;&#x9762;&#x9700;&#x8981;&#x5C55;&#x793A;&#x7528;&#x6237;&#x5F53;&#x524D;&#x5730;&#x7406;&#x4F4D;&#x7F6E;&#x7684;&#x5546;&#x6237;&#x5217;&#x8868;&#xFF0C;&#x9700;&#x8981;&#x5148;&#x8C03;&#x7528; <code>uni.geolocation.getLocation()</code> &#x63A5;&#x53E3;&#x83B7;&#x53D6;&#x5F53;&#x524D;&#x7684;&#x4F4D;&#x7F6E;&#x4FE1;&#x606F;&#xFF0C;&#x7136;&#x540E;&#x8C03;&#x7528; <code>uni.fetch.fetch()</code> &#x63A5;&#x53E3;&#x83B7;&#x53D6;&#x670D;&#x52A1;&#x5217;&#x8868;&#x3002;&#x5728;&#x5B9E;&#x73B0; <code>uni.geolocation.getLocation()</code> &#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x65F6;&#xFF0C;&#x5C31;&#x9700;&#x8981;&#x5224;&#x65AD;&#x5F53;&#x524D;&#x9875;&#x9762;&#x7684;&#x72B6;&#x6001;&#x8FDB;&#x884C;&#x4E0D;&#x540C;&#x7684;&#x64CD;&#x4F5C;&#xFF1A;</p>
<ul>
<li>&#x5982;&#x679C;&#x9875;&#x9762;&#x4ECD;&#x7136;&#x5728;&#x663E;&#x793A;&#x4E2D;&#xFF0C;&#x7EE7;&#x7EED;&#x8C03;&#x7528;fetch&#x63A5;&#x53E3;&#x83B7;&#x53D6;&#x670D;&#x52A1;&#x5217;&#x8868;</li>
<li>&#x5982;&#x679C;&#x9875;&#x9762;&#x5DF2;&#x88AB;&#x5207;&#x6362;&#x5230;&#x540E;&#x53F0;&#xFF0C;&#x5219;&#x7F13;&#x5B58;&#x5F53;&#x524D;&#x7684;&#x5730;&#x7406;&#x4F4D;&#x7F6E;</li>
<li>&#x5982;&#x679C;&#x9875;&#x9762;&#x5DF2;&#x88AB;&#x9500;&#x6BC1;&#xFF0C;&#x5219;&#x4E0D;&#x505A;&#x4EFB;&#x4F55;&#x5904;&#x7406;</li>
</ul>
<p>&#x4EE3;&#x7801;&#x793A;&#x4F8B;</p>
<pre><code class="lang-javascript">uni.geolocation.getLocation({
  success: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">data</span>) </span>{
    <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.$valid &amp;&amp; <span class="hljs-keyword">this</span>.$visible) {
      <span class="hljs-comment">// &#x9875;&#x9762;&#x5904;&#x4E8E;&#x5F53;&#x524D;&#x663E;&#x793A;&#x4E2D;</span>
    } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.$valid &amp;&amp; !<span class="hljs-keyword">this</span>.$visible) {
      <span class="hljs-comment">// &#x9875;&#x9762;&#x5904;&#x4E8E;&#x540E;&#x53F0;</span>
    } <span class="hljs-keyword">else</span> {
      <span class="hljs-comment">// &#x9875;&#x9762;&#x5904;&#x4E8E;&#x88AB;&#x9500;&#x6BC1;</span>
    }
  }.bind(<span class="hljs-keyword">this</span>),
  fail: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">data, code</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling fail, code=&quot;</span> + code);
  }
});
</code></pre>
<p>&#x9700;&#x8981;&#x7279;&#x522B;&#x6CE8;&#x610F;&#x7684;&#x662F;&#xFF0C;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x7684;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x4F1A;&#x88AB;&#x591A;&#x6B21;&#x8C03;&#x7528;&#x3002;&#x5982;&#x679C;&#x5728;&#x9875;&#x9762;&#x5207;&#x6362;&#x5230;&#x540E;&#x53F0;&#x6216;&#x8005;&#x88AB;&#x9500;&#x6BC1;&#x540E;&#xFF0C;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x4ECD;&#x7136;&#x88AB;&#x591A;&#x6B21;&#x56DE;&#x8C03;&#x7684;&#x8BDD;&#xFF0C;&#x65E2;&#x4F1A;&#x5F71;&#x54CD;&#x5E94;&#x7528;&#x7684;&#x54CD;&#x5E94;&#x901F;&#x5EA6;&#xFF0C;&#x4E5F;&#x4F1A;&#x9020;&#x6210;&#x5185;&#x5B58;&#x6CC4;&#x9732;&#x3002;&#x56E0;&#x6B64;&#xFF0C;&#x5F3A;&#x70C8;&#x5EFA;&#x8BAE;&#x4F7F;&#x7528;&#x4E0B;&#x9762;&#x4EFB;&#x4E00;&#x79CD;&#x65B9;&#x6CD5;&#x53D6;&#x6D88;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#xFF1A;</p>
<ol>
<li>&#x5728;&#x9875;&#x9762;&#x7684;onHide&#x51FD;&#x6570;&#x6216;onDestroy&#x51FD;&#x6570;&#x4E2D;&#x53D6;&#x6D88;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x8C03;&#x7528;</li>
<li>&#x5728;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x4E2D;&#x5224;&#x65AD;&#x5F53;&#x524D;&#x9875;&#x9762;&#x7684;&#x72B6;&#x6001;&#xFF0C;&#x53D1;&#x73B0;&#x9875;&#x9762;&#x88AB;&#x5207;&#x6362;&#x5230;&#x540E;&#x53F0;&#x6216;&#x9500;&#x6BC1;&#x540E;&#x53D6;&#x6D88;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x8C03;&#x7528;</li>
</ol>
<p>&#x63A8;&#x8350;&#x4F7F;&#x7528;&#x7B2C;1&#x79CD;&#x65B9;&#x6CD5;&#xFF0C;&#x56E0;&#x4E3A;&#x5B83;&#x80FD;&#x66F4;&#x53CA;&#x65F6;&#x7684;&#x53D6;&#x6D88;&#x56DE;&#x8C03;&#xFF0C;&#x6700;&#x597D;&#x7684;&#x907F;&#x514D;&#x989D;&#x5916;&#x6D88;&#x8017;&#x3002;</p>
<p>&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;&#xFF0C;&#x6709;&#x4E2A;&#x9875;&#x9762;&#x8C03;&#x7528; <code>uni.geolocation.subscribe</code> &#x8BB0;&#x5F55;&#x7528;&#x6237;&#x7684;&#x8FD0;&#x52A8;&#x8F68;&#x8FF9;&#x3002;</p>
<p>&#x4F7F;&#x7528;&#x7B2C;1&#x79CD;&#x65B9;&#x6CD5;&#x53D6;&#x6D88;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x7684;&#x903B;&#x8F91;&#x5982;&#x4E0B;&#xFF1A;</p>
<ul>
<li>onDestroy&#x51FD;&#x6570;&#x4E2D;&#x8C03;&#x7528;geolocation.unsubscribe&#x53D6;&#x6D88;&#x8BA2;&#x9605;</li>
<li>&#x5728;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x4E2D;&#x5224;&#x65AD;&#x5F53;&#x524D;&#x9875;&#x9762;&#x7684;&#x72B6;&#x6001;&#x5E76;&#x6B63;&#x786E;&#x5904;&#x7406;</li>
</ul>
<p>&#x4EE3;&#x7801;&#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
  onDestroy() {
    uni.geolocation.unsubscribe()
  },
  record() {
    uni.geolocation.getLocation({
      success: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">data</span>) </span>{
        <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.$valid &amp;&amp; <span class="hljs-keyword">this</span>.$visible) {
          <span class="hljs-comment">// &#x9875;&#x9762;&#x5904;&#x4E8E;&#x5F53;&#x524D;&#x663E;&#x793A;&#x4E2D;&#xFF0C;&#x8BB0;&#x5F55;&#x8F68;&#x8FF9;  </span>
        } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.$valid &amp;&amp; !<span class="hljs-keyword">this</span>.$visible) {
          <span class="hljs-comment">// &#x9875;&#x9762;&#x5904;&#x4E8E;&#x540E;&#x53F0;&#xFF0C;&#x8BB0;&#x5F55;&#x8F68;&#x8FF9;  </span>
        } <span class="hljs-keyword">else</span> {
          <span class="hljs-comment">// &#x9875;&#x9762;&#x5904;&#x4E8E;&#x88AB;&#x9500;&#x6BC1;&#xFF0C;&#x4E0D;&#x505A;&#x5904;&#x7406;  </span>
        }
      }.bind(<span class="hljs-keyword">this</span>),
      fail: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">data, code</span>) </span>{
        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling fail, code= &quot;</span> + code);
      }
    })
  }
};
</code></pre>
<p>&#x4F7F;&#x7528;&#x7B2C;2&#x79CD;&#x65B9;&#x6CD5;&#x53D6;&#x6D88;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x7684;&#x903B;&#x8F91;&#x5982;&#x4E0B;&#xFF1A;</p>
<ul>
<li>&#x5728;uni.geolocation.subscribe&#x8C03;&#x7528;&#x4F20;&#x5165;&#x7684;success&#x56DE;&#x8C03;&#x51FD;&#x6570;&#x4E2D;&#xFF0C;&#x9996;&#x5148;&#x5224;&#x65AD;&#x9875;&#x9762;&#x72B6;&#x6001;</li>
<li>&#x5982;&#x679C;&#x9875;&#x9762;&#x5DF2;&#x7ECF;&#x88AB;&#x9500;&#x6BC1;&#xFF0C;&#x8C03;&#x7528;uni.geolocation.unsubscribe&#x53D6;&#x6D88;&#x8BA2;&#x9605;</li>
</ul>
<p>&#x4EE3;&#x7801;&#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-javascript">uni.geolocation.getLocation({
  success: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">data</span>) </span>{
    <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.$valid &amp;&amp; <span class="hljs-keyword">this</span>.$visible) {
      <span class="hljs-comment">// &#x9875;&#x9762;&#x5904;&#x4E8E;&#x5F53;&#x524D;&#x663E;&#x793A;&#x4E2D;&#xFF0C;&#x8BB0;&#x5F55;&#x8F68;&#x8FF9;  </span>
    } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.$valid &amp;&amp; !<span class="hljs-keyword">this</span>.$visible) {
      <span class="hljs-comment">// &#x9875;&#x9762;&#x5904;&#x4E8E;&#x540E;&#x53F0;&#xFF0C;&#x8BB0;&#x5F55;&#x8F68;&#x8FF9;  </span>
    } <span class="hljs-keyword">else</span> {
      <span class="hljs-comment">// &#x9875;&#x9762;&#x5904;&#x4E8E;&#x88AB;&#x9500;&#x6BC1;  </span>
      uni.geolocation.unsubscribe()
    }
  }.bind(<span class="hljs-keyword">this</span>),
  fail: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">data, code</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;handling fail, code= &quot;</span> + code);
  }
});
</code></pre>
<p>&#x5728;&#x5E94;&#x7528;&#x751F;&#x547D;&#x5468;&#x671F;&#x56DE;&#x8C03;&#x4E2D;&#x53EF;&#x4EE5;&#x8C03;&#x7528;&#x63A5;&#x53E3;&#x65B9;&#x6CD5;&#xFF0C;&#x8FD9;&#x79CD;&#x8C03;&#x7528;&#x63A5;&#x53E3;&#x7684;&#x65B9;&#x5F0F;&#x4E0E;&#x9875;&#x9762;&#x65E0;&#x5173;&#xFF0C;&#x53EA;&#x8981;&#x5E94;&#x7528;&#x4ECD;&#x7136;&#x5728;&#x8FD0;&#x884C;&#x4E2D;&#xFF0C;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x90FD;&#x6709;&#x6548;&#x3002;&#x5373;&#x4F7F;&#x662F;&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#xFF0C;&#x4E5F;&#x5F3A;&#x70C8;&#x5EFA;&#x8BAE;&#x5728;&#x786E;&#x5B9A;&#x4E0D;&#x9700;&#x8981;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x4E3B;&#x52A8;&#x53D6;&#x6D88;&#x56DE;&#x8C03;&#x63A5;&#x53E3;&#x7684;&#x8C03;&#x7528;&#x3002;</p>
<h3 id="&#x5E38;&#x89C1;&#x9519;&#x8BEF;&#x4EE3;&#x7801;">&#x5E38;&#x89C1;&#x9519;&#x8BEF;&#x4EE3;&#x7801;</h3>
<table>
<thead>
<tr>
<th style="text-align:left">&#x4EE3;&#x7801;</th>
<th style="text-align:left">&#x542B;&#x4E49;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">200</td>
<td style="text-align:left">&#x4E00;&#x822C;&#x6027;&#x9519;&#x8BEF;</td>
</tr>
<tr>
<td style="text-align:left">201</td>
<td style="text-align:left">&#x7528;&#x6237;&#x62D2;&#x7EDD;</td>
</tr>
<tr>
<td style="text-align:left">202</td>
<td style="text-align:left">&#x53C2;&#x6570;&#x975E;&#x6CD5;</td>
</tr>
<tr>
<td style="text-align:left">203</td>
<td style="text-align:left">&#x670D;&#x52A1;&#x4E0D;&#x53EF;&#x7528;</td>
</tr>
<tr>
<td style="text-align:left">204</td>
<td style="text-align:left">&#x8BF7;&#x6C42;&#x8D85;&#x65F6;</td>
</tr>
</tbody>
</table>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="basic.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 基本功能">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"通用规则","level":"1.5.1","depth":2,"next":{"title":"基本功能","level":"1.5.2","depth":2,"path":"api/basic.md","ref":"api/basic.md","articles":[]},"previous":{"title":"接口","level":"1.5","depth":1,"ref":"","articles":[{"title":"通用规则","level":"1.5.1","depth":2,"path":"api/general.md","ref":"api/general.md","articles":[]},{"title":"基本功能","level":"1.5.2","depth":2,"path":"api/basic.md","ref":"api/basic.md","articles":[]},{"title":"界面交互","level":"1.5.3","depth":2,"path":"api/interface.md","ref":"api/interface.md","articles":[]},{"title":"网络访问","level":"1.5.4","depth":2,"path":"api/request.md","ref":"api/request.md","articles":[]},{"title":"文件数据","level":"1.5.5","depth":2,"path":"api/storage.md","ref":"api/storage.md","articles":[]},{"title":"系统能力","level":"1.5.6","depth":2,"path":"api/system.md","ref":"api/system.md","articles":[]},{"title":"图形图像","level":"1.5.7","depth":2,"path":"api/media.md","ref":"api/media.md","articles":[]},{"title":"分享","level":"1.5.8","depth":2,"path":"api/share.md","ref":"api/share.md","articles":[]},{"title":"支付","level":"1.5.9","depth":2,"path":"api/pay.md","ref":"api/pay.md","articles":[]},{"title":"统计","level":"1.5.10","depth":2,"path":"api/stat.md","ref":"api/stat.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"api/general.md","mtime":"2018-02-10T11:54:07.322Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-04-04T08:24:24.953Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

